export default {
  namespaced: true,
  state: {
    title: 'home'
  },
  mutations: {
    // this.$store.commit('home/SETUSERNAME','首页')
    SETTITLE (state, value) {
      state.title = value
    }
  },
  actions: {
    updateTitle (ctx, value) {
      setTimeout(() => {
        ctx.commit('SETTITLE', value)
      }, 2000)
    }
  },
  getters: {
    getUsername (state) {
      return '标题:' + state.title
    }
  }
}
